
package com.usersmodule.bean;

import java.io.Serializable;

import com.usersmodule.dao.TbModuleDAO;
import com.usersmodule.dao.TbRoleDAO;
import com.usersmodule.dao.TbUserActionsDAO;

public class TbRoleModuleMiddle implements Serializable{

    private int roleModuleMiddleId;

    private int roleId;
    private TbRole tbRole;
    
    private int moduleId;
    private TbModule TbModule;

    private int userAction;
    private TbUserActions tbUserAction;

    private String createTime;

    public int getRoleModuleMiddleId(){
        return roleModuleMiddleId;
    }

    public void setRoleModuleMiddleId(int roleModuleMiddleId){
        this.roleModuleMiddleId = roleModuleMiddleId;
    }

    public int getRoleId(){
        return roleId;
    }

    public void setRoleId(int roleId){
    	this.tbRole = new TbRoleDAO().getTbRoleByRoleId(roleId);
        this.roleId = roleId;
    }

    public int getModuleId(){
        return moduleId;
    }

    public void setModuleId(int moduleId){
    	this.TbModule = new TbModuleDAO().getTbModuleByModuleId(moduleId);
        this.moduleId = moduleId;
    }

    public int getUserAction(){
        return userAction;
    }

    public void setUserAction(int userAction){
    	this.tbUserAction = new TbUserActionsDAO().getTbUserActionsByUserAction(userAction);
        this.userAction = userAction;
    }

    public String getCreateTime(){
        return createTime;
    }

    public void setCreateTime(String createTime){
        this.createTime = createTime;
    }

    public TbRole getTbRole() {
		return tbRole;
	}

	public void setTbRole(TbRole tbRole) {
		this.tbRole = tbRole;
	}

	public TbModule getTbModule() {
		return TbModule;
	}

	public void setTbModule(TbModule tbModule) {
		TbModule = tbModule;
	}

	public TbUserActions getTbUserAction() {
		return tbUserAction;
	}

	public void setTbUserAction(TbUserActions tbUserAction) {
		this.tbUserAction = tbUserAction;
	}
    public TbRoleModuleMiddle(){
    }
    public TbRoleModuleMiddle(int roleId,int moduleId,int userAction){
        this.roleId = roleId;
        this.moduleId = moduleId;
        this.userAction = userAction;
    }
    public TbRoleModuleMiddle(int roleModuleMiddleId,int roleId,int moduleId,int userAction){
        this.roleModuleMiddleId = roleModuleMiddleId;
        this.roleId = roleId;
        this.moduleId = moduleId;
        this.userAction = userAction;
    }

	
}

